<?php
function cek_profpic($pic){
    if($pic == null){
        echo base_url('img/placeholder.png');
    }else{
        echo base_url('img/profpic/'.$pic);
    }
}
?>
<div class="container">
    <h2 style="text-transform: capitalize;"><?php echo $row->nama_group; ?></h2>
    <a id="btncompose" class="btn fancybox fancybox.iframe" href="<?php echo site_url(); ?>dosen/compose_launch/<?php echo $row->id_group; ?>"><i class="icon-pencil"></i></a>
    <a id="btnaddmember" class="btn fancybox fancybox.iframe" href="<?php echo site_url(); ?>dosen/add_member/<?php echo $row->id_group; ?>"><i class="icon-plus"></i></a>
    <hr />
    <div class="row">
<!--        main container-->
        
        <div class="span8">
            <p class="lead">Recent Posts</p>
            <ul class="media-list" id="list">
                <?php $this->load->view('groups/showPostings'); ?>
            </ul>
        </div>

<!--side container-->
        <div class="span4">
            <a href="#">
                <center><h6>3 Members</h6></center>
            </a>
            
            <ul class="media-list">
                <?php foreach($members as $member){ ?>
                <li class="media">
                    <a class="pull-left" href="#">
                        <img class="media-object span1" src="<?php cek_profpic($member->profpic); ?>"/>
                    </a>
                    <div class="media-body">
                        <h4 class="media-heading"><?php echo $member->nama; ?></h4>
                    </div>
                </li>
                <?php } ?>
            </ul>
        </div>
    </div>
</div>
<script type="text/javascript">
    
    function posted(){
        $.get('<?php echo site_url('dosen/refresh_posting/'.$row->id_group); ?>', function(data) {
            $('#list').html(data);
        });
        parent.$.fancybox.close();
    }
</script>